/**
 * pharma-model - 6 mai 2011 guillaume
 */
package org.bspv.pharma.model;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.bspv.pharma.model.Event.EventTypeEnum;

/**
 * @author guillaume
 * 
 */
@Entity
@Table(name = "NOTIFICATION_REQUEST")
public class NotificationRequest {

    /**
     * serialVersionUID.
     */
    public static final long serialVersionUID = 1L;

    /**
     * @author guillaume Enumération représentant le mode de notification.
     */
    public static enum NotificationModeEnum {
        /**
         * Notification par mail.
         */
        MAIL,
        /**
         * Notification par sms.
         */
        SMS;
    }

    /**
     * Identifiant de la demande de notification.
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    /**
     * Utilisateur concerné.
     */
    @NotNull
    @ManyToOne
    private User user;
    /**
     * Type d'événement à notifier.
     */
    @NotNull
    @Enumerated(EnumType.STRING)
    private EventTypeEnum eventType;
    /**
     * Mode de notifcation.
     */
    @NotNull
    @Enumerated(EnumType.STRING)
    private NotificationModeEnum notificationMode;
    /**
     * @return the id
     */
    public final Long getId() {
        return id;
    }
    /**
     * @param id the id to set
     */
    public final void setId(Long id) {
        this.id = id;
    }
    /**
     * @return the user
     */
    public final User getUser() {
        return user;
    }
    /**
     * @param user the user to set
     */
    public final void setUser(User user) {
        this.user = user;
    }
    /**
     * @return the eventType
     */
    public final EventTypeEnum getEventType() {
        return eventType;
    }
    /**
     * @param eventType the eventType to set
     */
    public final void setEventType(EventTypeEnum eventType) {
        this.eventType = eventType;
    }
    /**
     * @return the notificationMode
     */
    public final NotificationModeEnum getNotificationMode() {
        return notificationMode;
    }
    /**
     * @param notificationMode the notificationMode to set
     */
    public final void setNotificationMode(NotificationModeEnum notificationMode) {
        this.notificationMode = notificationMode;
    }
    
    
}
